<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>计时器</title>
	</head>
	<body>
		
		<div id="a"></div>
		<script type="text/javascript">
			function Time(){
				var today=new Date();
				var h=today.getHours();
				var m=today.getMinutes();
				var s=today.getSeconds();
				h=(h<10?'0'+h:h);
				m=(m<10?'0'+m:m);
				s=(s<10?'0'+s:s);
				var time=document.getElementById('a');
				time.innerHTML=h+":"+m+":"+s;
			}
			
			window.setInterval(Time,1000);
		</script>
	</body>
</html>
